package com.asia5b.a5mall.middleware.logic.viewmodel.goods

import com.asia5b.a5bmall.resource.ResString
import com.asia5b.a5mall.middleware.R
import com.asia5b.a5mall.middleware.base.SimpleViewModel
import com.asia5b.a5mall.middleware.utils.showMessage
import io.reactivex.functions.Consumer

/**
 * Created by zhangyuncai on 2020/1/22.
 */
class GoodsCouponDFVM :SimpleViewModel() {


    /**
     * 领取优惠券
     */
    fun receiveCoupon(couponId: Int) {
        baseSubscribe(memberApi.receiveCoupon("$couponId"), Consumer {
            showMessage(ResString.get(R.string.领取成功))
        })

    }
}